<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      //   function Person() {
      //     this.name = "张三";
      //   }
      //   console.log(typeof Person.prototype);
      //   let obj = {
      //     name: "张三",
      //   };
      //   console.log(typeof obj.__proto__);
      //   console.log(Object.prototype.prototype);
      //   Object.prototype.age = 20;
      //   let obj = {
      //     name: "张三",
      //   };
      //   Object.setPrototypeOf(obj, {
      //     height: "176cm",
      //   });
      //   //   console.log(obj);
      //   //   console.log(obj.name);
      //   //   console.log(obj.age);
      //   //   console.log(obj.height);
      //   for (let key in obj) {
      //     console.log(key);
      //   }
      //   function Person() {
      //     this.name = "张三";
      //   }
      //   let zhangsan = new Person();
      //   console.log(zhangsan instanceof Person);
      //   console.log(zhangsan instanceof Object);
      //   let arr = new Array();
      //   let obj = {};
      //   console.log(obj instanceof Object);
      //   console.log(arr instanceof Array);
      let obj = {
        age: 20,
      };
      Object.setPrototypeOf(obj, { age: 30 });
      Object.prototype.age = 40;
      console.log(obj.age);
    </script>
  </body>
</html>
